<?php
namespace App\Logic\SalesReportLT;
class PaymentReportWork
{
    public static function accounting($model,$date)
    {
        if('null' == $date){
            $date = date('Y-m-01',strtotime('midnight first day of -1 month'));
        }
        ini_set('memory_limit', '200M');
        set_time_limit(0);
        $class = self::$_model[$model];
        $class::exePayment($date);
    }

    private static $_model = ['detail' => PaymentDetail::class,
        'common-fee' => PaymentCommonFee::class,
        'classify' => PaymentClassify::class,
        'seller' => PaymentSeller::class,
        'none-classify' => PaymentNoneClassify::class,
        'none' => PaymentNone::class,
    ];
}
